<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="<?php echo $this->url->getBaseUri() ?>public/back/Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->url->getBaseUri() ?>public/back/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo $this->url->getBaseUri() ?>public/back/Css/style.css" />
    <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/jquery.js"></script>
    <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/bootstrap.js"></script>
    <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/ckform.js"></script>
    <script type="text/javascript" src="<?php echo $this->url->getBaseUri() ?>public/back/Js/common.js"></script>

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form  id='frm1' class="form-inline definewidth m20" action="<?php echo $this->url->getBaseUri() ?>admin/User/search" method="post">  
    用户名：
    <input type="text" name="name" id="rolename"class="abc input-default" placeholder="" value="">&nbsp;&nbsp; 
    手机号：
    <input type="text" name="tel" id="rolename"class="abc input-default" placeholder="" value="">&nbsp;&nbsp;   
    <button type="submit" class="btn btn-primary">查询</button>&nbsp;&nbsp; 
</form>

<table class="table table-bordered table-hover definewidth m10" >
    <thead>
    <tr>
        <th>用户</th>
        <th>电话号码</th>
        <th>剩余金额</th>
        <th>操作</th>
    </tr>
    </thead>
    <?php foreach($page->items  as $user) { ?>
         <tr>
            <td><?php echo $user->name ?></td>
            <td><?php echo $user->tel ?></td>
            <td><?php echo $user->money ?></td>
            <td>
               <a href="<?php echo $this->url->getBaseUri() ?>admin/User/del/<?php echo $user->id ?>">删除</a>
            </td>
        </tr>
    <?php } ?>
        <tr>
            <td colspan="11" align="right" style="text-align:right">
            <a href="<?php echo $this->url->getBaseUri() ?>admin/User/index/1">第一页</a>
            <a href="<?php echo $this->url->getBaseUri() ?>admin/User/index/<?= $page->before; ?>">上一页</a>
            <a href="<?php echo $this->url->getBaseUri() ?>admin/User/index/<?= $page->next; ?>">下一页</a>
            <a href="<?php echo $this->url->getBaseUri() ?>admin/User/index/<?= $page->last; ?>">最后一页</a>

            <?php echo "页码 ", $page->current, " 总页数 ", $page->total_pages; ?>
            </td>
        </tr>

</table>
</body>
</html>
<script>
    $(function () {
        
        $('#addnew').click(function(){

                window.location.href="add.html";
         });


    });

    function del(id)
    {
        
        
        if(confirm("确定要删除吗？"))
        {
        
            var url = "index.html";
            
            window.location.href=url;       
        
        }
    
    
    
    
    }
</script>